package com.flurry.android;

import android.content.Context;
import android.content.res.Resources;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;

final class cf extends RelativeLayout
  implements View.OnClickListener
{
  private final String TAG = getClass().getSimpleName();
  private boolean eA;
  private WebView eq;
  private WebViewClient er;
  private WebChromeClient es;
  private boolean et;
  private ImageView eu;
  private ImageView ev;
  private ImageView ew;
  private h ex;
  private ee ey;
  private aq ez;

  public cf(Context paramContext, String paramString)
  {
    super(paramContext);
    this.eq = new WebView(paramContext);
    this.er = new db(this);
    this.es = new ab(this);
    this.eq.getSettings().setJavaScriptEnabled(true);
    this.eq.getSettings().setUseWideViewPort(true);
    if (n.SDK_INT >= 7)
      this.eq.getSettings().setLoadWithOverviewMode(true);
    this.eq.getSettings().setBuiltInZoomControls(true);
    if (n.SDK_INT >= 11)
      this.eq.getSettings().setDisplayZoomControls(false);
    this.eq.setWebViewClient(this.er);
    this.eq.setWebChromeClient(this.es);
    this.eq.loadUrl(paramString);
    this.eu = new ImageView(paramContext);
    this.eu.setId(0);
    this.eu.setImageDrawable(getResources().getDrawable(17301560));
    this.eu.setOnClickListener(this);
    this.ev = new ImageView(paramContext);
    this.ev.setId(1);
    this.ev.setImageDrawable(getResources().getDrawable(17301580));
    this.ev.setOnClickListener(this);
    this.ew = new ImageView(paramContext);
    this.ew.setId(2);
    this.ew.setImageDrawable(getResources().getDrawable(17301565));
    this.ew.setOnClickListener(this);
    setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
    addView(this.eq);
    RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams1.addRule(14);
    addView(this.eu, localLayoutParams1);
    RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams2.addRule(9);
    addView(this.ev, localLayoutParams2);
    RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams3.addRule(11);
    addView(this.ew, localLayoutParams3);
  }

  public final void a(aq paramaq)
  {
    this.ez = paramaq;
  }

  public final void a(ee paramee)
  {
    this.ey = paramee;
  }

  public final void a(h paramh)
  {
    this.ex = paramh;
  }

  public final boolean canGoBack()
  {
    return (this.et) || ((this.eq != null) && (this.eq.canGoBack()));
  }

  public final void destroy()
  {
    if (this.eq != null)
    {
      removeView(this.eq);
      this.eq.stopLoading();
      if (n.SDK_INT >= 11)
        this.eq.onPause();
      this.eq.destroy();
      this.eq = null;
    }
  }

  public final String getUrl()
  {
    WebView localWebView = this.eq;
    String str = null;
    if (localWebView != null)
      str = this.eq.getUrl();
    return str;
  }

  public final void goBack()
  {
    if (this.et)
      this.es.onHideCustomView();
    while (this.eq == null)
      return;
    this.eq.goBack();
  }

  public final void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
    case 0:
    case 2:
    case 1:
    }
    do
    {
      do
      {
        do
          return;
        while (this.ey == null);
        this.ey.u.finish();
        return;
      }
      while ((this.eq == null) || (!this.eq.canGoForward()));
      this.eq.goForward();
      return;
      if ((this.eq != null) && (this.eq.canGoBack()))
      {
        this.eq.goBack();
        return;
      }
    }
    while (this.ey == null);
    this.ey.u.finish();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.flurry.android.cf
 * JD-Core Version:    0.6.2
 */